package com.ruoyi.basedata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 销户销表记录对象 t_account
 *
 * @author gdqt
 * @date 2024-03-12
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_account")
public class Account extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableField("id")
    private Long id;

    /**
     * 设备归属水司
     */
    @TableField("tenant_id")
    private String tenantId;

    /**
     * 区域编号
     */
    @TableField("sheets_code")
    private String sheetsCode;

    @Excel(name = "所属区域")
    @TableField(exist = false)
    private String sheetsName;

    /**
     * 设备类型1-大表、2-小表
     */
    @Excel(name = "表类型", dictType = "terminal_meter_type")
    @TableField("terminal_type")
    private Long terminalType;

    /**
     * 用户编号
     */
    @Excel(name = "用户编号")
    @TableField("user_id")
    private String userId;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;


    /**
     * 位置识别编号
     */
    @Excel(name = "位置识别编号")
    @TableField("location_nb")
    private String locationNb;

    /**
     * 销表时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "销表时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    /**
     * 操作人员
     */
    @Excel(name = "操作人员")
    @TableField("operator")
    private String operator;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("tenantId", getTenantId())
                .append("sheetsCode", getSheetsCode())
                .append("terminalId", getTerminalId())
                .append("userId", getUserId())
                .append("terminalType", getTerminalType())
                .append("locationNb", getLocationNb())
                .append("operator", getOperator())
                .append("createTime", getCreateTime())
                .toString();
    }
}
